﻿<%@ Page Title="CERTI" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Maticsoft.Web.CERTI.List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" src="/js/CheckBox.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<!--Title -->

            <!--Title end -->

            <!--Add  -->

            <!--Add end -->

            <!--Search -->
            <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
                <tr>
                    <td style="width: 80px" align="right" class="tdbg">
                         &nbsp;
                    </td>
                    <td class="tdbg">
                    <table>
                    <tr>
                    <td>
                    <b>关键字：</b>
                    </td>
                    <td>
                    
                    <asp:TextBox ID="txtKeyword" runat="server"></asp:TextBox>
                    </td>
                    <td>
                    <asp:Button ID="btnSearch" runat="server" Text="查询"  OnClick="btnSearch_Click" >
                    </asp:Button>
                    </td>
                    <td>
                     &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                    </td>
                    </tr>
                    </table>                       
                    
                   
                    
                        
                    </td>
                    
                </tr>
            </table>
            <!--Search end-->
            <br />
            <asp:GridView ID="gridView" runat="server" AllowPaging="True" Width="100%" CellPadding="3"  OnPageIndexChanging ="gridView_PageIndexChanging"
                    BorderWidth="1px" DataKeyNames="ZSH" OnRowDataBound="gridView_RowDataBound"
                    AutoGenerateColumns="false" PageSize="30" OnRowDeleting="gridView_RowDeleting"  RowStyle-HorizontalAlign="Center" OnRowCreated="gridView_OnRowCreated">
                    <Columns>
                    <asp:TemplateField ControlStyle-Width="30" HeaderText="选择">
                                <ItemTemplate>
                                    <asp:CheckBox ID="DeleteThis" onclick="javascript:void(0);" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField> 
                            
		<asp:BoundField DataField="ZSH" HeaderText="证书号" SortExpression="ZSH" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="JCS" HeaderText="金成色" SortExpression="JCS" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="PM" HeaderText="品名" SortExpression="PM" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="JJZ" HeaderText="净金重" SortExpression="JJZ" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="BM" HeaderText="编码" SortExpression="BM" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="BZ" HeaderText="备注" SortExpression="BZ" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="TEMP" HeaderText="价格" SortExpression="TEMP" ItemStyle-HorizontalAlign="Center"  />
		<asp:BoundField DataField="CREATEDATE" HeaderText="创建时间" SortExpression="CREATEDATE" ItemStyle-HorizontalAlign="Center"  /> 
		
                            
                            <asp:HyperLinkField HeaderText="详细" ControlStyle-Width="50" DataNavigateUrlFields="ZSH" DataNavigateUrlFormatString="Show.aspx?ZSH={0}"
                                Text="详细"  />
                            <asp:HyperLinkField HeaderText="编辑" ControlStyle-Width="50" DataNavigateUrlFields="ZSH" DataNavigateUrlFormatString="Modify.aspx?ZSH={0}"
                                Text="编辑"  />
                            <asp:TemplateField ControlStyle-Width="50" HeaderText="删除" Visible="True">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                         Text="删除"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                </asp:GridView>
               <table border="0" cellpadding="0" cellspacing="1" style="width: 100%;">
                <tr>
                    <td style="width: 1px;">                        
                    </td>
                    <td align="left">
                        <asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click"/>                       
                    </td>
                    <td style="width: 1px;">                        
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td align="left">
                        <asp:Button ID="Button1" runat="server" Text="全部删除" OnClientClick="return confirm('你确认要全部删除吗？')" OnClick="btnAllDelete_Click"/>                       
                    </td>
                </tr>
            </table>
            
            
            
            <script>
            
            try
            {
var r=document.getElementById('ctl00_ContentPlaceHolder1_gridView').rows.length;
var c=document.getElementById('ctl00_ContentPlaceHolder1_gridView').rows[(r-1)].cells[0];
var d=document.getElementById('ctl00_ContentPlaceHolder1_gridView');
//alert(c.outerHTML);
//c.align='center';
c.setAttribute('align','right');
//c.setAttribute("align","center");
//c.style.textAlign="center";
//alert(c.outerHTML);
//document.getElementById('ctl00_ContentPlaceHolder1_gridView').rows[].
}catch(ex)
{}
</script>
</asp:Content>
<%--<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceCheckright" runat="server">
</asp:Content>--%>
